<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMerchantDeliveryMethodTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('merchant_delivery_method', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('merchant_id')                  ->default(0)->comment('门店id');
            $table->string('delivery_method')               ->default('')->comment('配送方式 self_pick：自提 express_delivery：快递 instant_delivery：即时配送');
            $table->decimal('delivery_fee')                 ->default(0)->comment('配送|快递费');
            $table->decimal('delivery_range')               ->default(0)->comment('配送范围');
            $table->decimal('start_delivery_fee')           ->default(0)->comment('起送价');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('merchant_delivery_method');
    }
}
